package it.appetite;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

public class LiveActivity extends Activity {

	private LiveActivity cxt;
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.live);
        this.cxt = this;
    
        View.OnClickListener gestore = new View.OnClickListener() {
        	public void onClick(View view) { 

        		Intent intent = new Intent(cxt, ConcertActivity.class);
        		
        		switch(view.getId()){

        		case R.id.data1Img:
        			intent.putExtra("member", R.id.data1Img);
        			break;
        			
        		case R.id.data2Img:
        			intent.putExtra("member", R.id.data2Img);
        			break;
        			
        		case R.id.data3Img:
        			intent.putExtra("member", R.id.data3Img);
        			break;
        			
        		case R.id.data4Img:
        			intent.putExtra("member", R.id.data4Img);
        			break;
        		}
        		
        		startActivity(intent);
        	}
        };
        
        ImageView data1Img = (ImageView) findViewById(R.id.data1Img);
        ImageView data2Img = (ImageView) findViewById(R.id.data2Img);
        ImageView data3Img = (ImageView) findViewById(R.id.data3Img);
        ImageView data4Img = (ImageView) findViewById(R.id.data4Img);
        
        data1Img.setOnClickListener(gestore);
        data2Img.setOnClickListener(gestore);
        data3Img.setOnClickListener(gestore);
        data4Img.setOnClickListener(gestore);
    }
}
